<html ng-app>
<head>
<script type="text/javascript" src="./angular/angular.js"></script>


</head>
<body>

	<form ng-controller="StartUpController">
		Starting: <input ng-model="funding.startingEstimate" /> 
			<br /> Recommendation: {{funding.needed}}
			
			<br></br>
			
			<button ng-click = "reset()">Reset</button>
	</form>

	<script type="text/javascript">
		function StartUpController($scope) {

			$scope.funding = {
				startingEstimate : 0
			};

			computeNeeded = function() {
				$scope.funding.needed = $scope.funding.startingEstimate * 10;
			};
			
			$scope.reset = function() {
				$scope.funding.startingEstimate = 0;
			};
			
			$scope.$watch('funding.startingEstimate', computeNeeded);

		}
	</script>

</body>
</html>